﻿Ext.define('Wiztop.model.Topic', {
    extend: 'Ext.data.Model',
    config: {
        fields: ['Id', 'Title', 'Details', 'Description', 'EmployeeId', 'EmployeeName', 'RoleId', 'CreateTime', 'Comment', 'IsActive', 'IsSubmit', 'SignNumber', 'UnSignNumber', 'Agent', 'ExtNumber', 'Asks', 'MeetingNumber'],
        validations: [
        { type: 'presence', field: 'Title', message: '议题标题必须输入' },
        { type: 'length', field: 'Title', message: '标题长度不能超过500' },
        { type: 'presence', field: 'Details', message: '议题内容必须输入' },
        ],
        hasMany: {
            model: 'TopicDoc', name: 'Documents',
            model: 'TopicApprove', name: 'Approves',
            model: 'TopicPlate', name: 'Plates'
        }
    }
});